package com.bawei.lib_net.interceptor

import android.os.Build
import com.bawei.lib_net.storage.AuthMMKV
import okhttp3.Interceptor
import okhttp3.Response

/**
 *作者：lxy
 *功能:请求头拦截器
 *时间：2025/5/23
 */
class HttpHeaderInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originRequest = chain.request()
        val newRequest = originRequest.newBuilder()
            .addHeader("accessId", AuthMMKV.accessId)
            .addHeader("token", AuthMMKV.token)
            .build()
        return chain.proceed(newRequest)
    }
}